package myschool;

public class Teacher implements Content{
    private String name;
    private String className;

    public Teacher(String name, String className) {
        this.name = name;
        this.className = className;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    @Override
    public String getInfo() {
        StringBuffer sb = new StringBuffer();
        sb.append("老师姓名：").append(this.getName()).append("\n\t")
                .append("授课内容：").append(this.getClassName()).append("\n");
        return sb.toString();
    }
}
